home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
PASSRC.ZIP
/
READINTS.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-02-04
|
2KB
|
70 lines
(* Chapter 11 - Program 4 *)
program Read_Integers_From_File;
var Cupcake : text;
Index : byte;
Var1,Var2,Var3,Var4,Var5 : integer;
begin
Assign(Cupcake,'INTDATA.TXT');
Reset(Cupcake);
for Index := 1 to 5 do begin
Read(Cupcake,Var1,Var2,Var3);
Writeln(Var1:6,Var2:6,Var3:6);
end;
Reset(Cupcake);
Writeln;
for Index := 1 to 5 do begin
Readln(Cupcake,Var1,Var2,Var3);
Writeln(Var1:6,Var2:6,Var3:6);
end;
Reset(Cupcake);
Writeln;
for Index := 1 to 5 do begin
Read(Cupcake,Var1,Var2,Var3,Var4,Var5);
Writeln(Var1:6,Var2:6,Var3:6,Var4:6,Var5:6);
end;
Reset(Cupcake);
Writeln;
for Index := 1 to 5 do begin
Readln(Cupcake,Var1,Var2,Var3,Var4,Var5);
Writeln(Var1:6,Var2:6,Var3:6,Var4:6,Var5:6);
end;
Close(Cupcake);
end. (* of main program *)
{ Result of execution (This data is read from INTDATA.TXT)
101 102 103
104 105 106
107 108 109
110 111 112
113 114 115
101 102 103
105 106 107
109 110 111
113 114 115
117 118 119
101 102 103 104 105
106 107 108 109 110
111 112 113 114 115
116 117 118 119 120
121 122 123 124 125
101 102 103 104 105
109 110 111 112 113
117 118 119 120 121
125 126 127 128 129
133 134 135 136 137
}